package cn.edu.sdu.sol.intake_system.utils;

import cn.edu.sdu.sol.intake_system.model.vo.DataResponse;
import kong.unirest.HttpStatus;

public class VO {

    public DataResponse data(Object data) {
        return new DataResponse(HttpStatus.OK, data, null);
    }

    public DataResponse messageOK(String message) {
        return new DataResponse(HttpStatus.OK, null, message);
    }

    public DataResponse messageError(String message) {
        return new DataResponse(HttpStatus.BAD_REQUEST, null, message);
    }

    public DataResponse ok() {
        return new DataResponse(HttpStatus.OK, null, "ok");
    }

    public DataResponse code(int code) {
        return new DataResponse(code, null, null);
    }

}
